package com.eati.cm.serv_impl;

import com.eati.cm.model.StoryWork;
import com.eati.cm.repo.StoryWorkRepo;
import com.eati.cm.serv.IStoryWorkServ;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class StoryWorkServ implements IStoryWorkServ {
    @Autowired
    private StoryWorkRepo storyWorkRepo;

    @Override
    public List<StoryWork> findAll() {
        return storyWorkRepo.findAll();
    }

    @Override
    public void save(StoryWork storyWork) {
        storyWorkRepo.save(storyWork);
    }

    @Override
    public void delete(StoryWork storyWork){
        storyWorkRepo.delete(storyWork);
    }
}
